#ifndef IDT_HPP
#define IDT_HPP

#include "types.hpp"
#include "interrupts.hpp"

namespace system {
    struct idt_pointer {
        uint16 limit;
        uint32 base;
    } __attribute__((packed));

    struct idt_entry {
        uint16 base_low;
        uint16 segment;
        uint8  zero;
        uint8  type;
        uint16 base_high;
    } __attribute__((packed));

    extern "C" {
        void idt_flush();
        extern idt_entry idt_table[256];
        extern interrupt_handler isr[256];
        extern idt_pointer idt_table_ptr;
    }
}

#endif // IDT_HPP
